﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class SoundButton : MonoBehaviour
{
	Button self;

	void Start ()
	{
		self = GetComponent<Button> ();
		self.image.sprite = AudioManager.instance.GetSoundStatus ();

		self.onClick.AddListener (() => OnClick ());
	}

	void OnClick ()
	{
		self.image.sprite = AudioManager.instance.ChangeSoundStatus ();

	}
}
